We'll look closely at the respective functions of the Channel class and the Selector class, and at how the two work together to create a nonblocking I/ O implementation. 我们将仔细考察Channel类和Selector类的各个功能,以及这两个类如何协同工作,创建非阻塞I/O实现。
A Channel class must work in conjunction with the Selector class to achieve nonblocking I/ O. 要实现非阻塞I/O,Channel类必须与Selector类配合进行工作。
The application then registers channels ( file descriptors) and interested operations to the selector with a register() call on the channel. 然后,应用程序用register()调用向选择器注册通道(文件描述符)和感兴趣的操作。